package com.infosys.cabplanningdao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * 
 * @author balaji_ramanathan01
 *
 */
public class App 
{
	static final String DB_URL = "jdbc:mysql://173.194.85.133/hackathon?user=root";
	
    public static void main( String[] args )
    {
    	try {
			Class.forName("com.mysql.jdbc.Driver");
			Connection conn = DriverManager.getConnection(DB_URL,"root", "hackathon_root");
			ResultSet rs = conn.createStatement().executeQuery(
			    "SELECT * from hackathon.Test");
			while(rs.next()){
				System.out.println(rs.getInt(1));
			}
			System.out.println("Done");
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    }
}
